<template>
  <div>
    <div>
      <TbTitle title="二、收费与服务情况" />
      <TbTitle level="2" title="（一）、会费情况" />
      <table class="m-table" border="" style="width: 100%; font-size: 14px; margin-bottom: 20px;">
        <tr>
          <td rowspan="4">制定或修改会费标准的会议情况</td>
          <td>会议名称</td>
          <td colspan="5"><span>{{membership.meetingName}}</span></td>
        </tr>
        <tr>
          <td>会议时间</td>
          <td colspan="2"><span>{{ membership.meetingTime }}</span></td>
          <td>表决方式</td>
          <td colspan="2"><span>{{ membership.voteMode == 1?'无记名投票':membership.voteMode == 2?'举手表决':'鼓掌通过' }}</span></td>
        </tr>
        <tr>
          <td>应出席人数</td>
          <td colspan="2"><span>{{ membership.wantAttendNum }}</span></td>
          <td>实际出席人数</td>
          <td colspan="2"><span>{{ membership.actualAttendNum }}</span></td>
        </tr>
        <tr>
          <td>赞同人数</td>
          <td style="width: 100px;"><span>{{ membership.favorNum }}</span></td>
          <td>反对人数</td>
          <td><span>{{ membership.opposeNum }}</span></td>
          <td>弃权人数</td>
          <td style="width: 100px;"><span>{{ membership.waiverNum }}</span></td>
        </tr>
        <tr>
          <td colspan="2">会费标准向全体会员公开</td>
          <td colspan="5"><span>{{ membership.disclosure == 1?'是':'否' }}</span></td>
        </tr>
        <tr>
          <td>会费标准（按层级填写，示例：会长 一年一缴 xxx元）</td>
          <td colspan="7" style="text-align: left;"><span>{{ membership.standard }}</span></td>
        </tr>
      </table>
    </div>
    <div>
      <TbTitle level="2" title="（二）、收费情况" />
      <table border="" class="m-table" style="width: 100%; font-size: 14px; margin-bottom: 20px;">
        <tr>
          <td>收费类型</td>
          <td>收费依据</td>
          <td>是否公示</td>
          <td>
            {{ detailInfo.examineYear - 1 }}年度收入情况(万元)
          </td>
          <td>
            {{ detailInfo.examineYear }}度收入情况(万元)
          </td>
          <td>
            {{ detailInfo.examineYear - (-1) }}年度1-5月收入情况(万元)
          </td>
          <td style="width: 100px">备注</td>
        </tr>
        <tr v-for="item in detailInfo.chargelist">
          <td>{{ item.chargeTypeName }}</td>
          <td>{{ item.chargeBasis }}</td>
          <td>{{ yesNoBool(item.isPublic) }}</td>
          <td>{{ item.upTowIncome }}</td>
          <td>{{ item.upIncome }}</td>
          <td>{{ item.thenIncome }}</td>
          <td>{{ item.upIncome }}</td>
        </tr>
      </table>
    </div>
  </div>
</template>

<script setup lang="ts">
import TbTitle from '@/views/yearCheck/components/TbTitle.vue'
import { reactive, ref, inject, getCurrentInstance } from 'vue'
let detailInfo = reactive({})
let membership = reactive({})
const { getDetailInfo } = inject('getDetailInfo')

const { proxy } = getCurrentInstance();
const yesNoBool = proxy.$yesNoBool


getDetailInfo().then(res => {
  Object.assign(detailInfo, res.data)
  Object.assign(membership, res.data.membership)
})

</script>
<style lang="scss" scoped>
.msg-tip {
  padding: 20px 0;
  color: #000;

  font-family: '微软雅黑';
}

table {
  border-spacing: 0px;
  width: 100%;
  border-top: 1px solid #999;
  border-left: 1px solid #999;
  color: #000;

  thead {
    background: #f5f7fa;
    color: rgb(37, 43, 53);

    th {
      border-right: 1px solid #999;
      border-bottom: 1px solid #999;
      text-align: center;
      height: 40px;
    }
  }

  tbody {
    td {
      height: 40px;
      border-right: 1px solid #999;
      border-bottom: 1px solid #999;
      text-align: center;

      &.td-head {
        background: #f5f7fa;
      }
    }
  }
}
</style>
